package com.yx.common.core.enums;

import org.springframework.util.StringUtils;

public enum DbTypeEnum {
      ads
     ,amazon_redshift
     ,apache_imapala
     ,apache_kylin
     ,apache_phoenix
     ,derby
     ,gbase_8a
     ,gbase_8s
     ,gbase_8t
     ,h2
     ,hadoop_hive
     ,hbase_phoenix{
          @Override
          public boolean userAndPwdNotEmpty(String user, String pwd) {
               return true;
          }
     }
     ,hbase{
          @Override
          public boolean userAndPwdNotEmpty(String user, String pwd) {
               return true;
          }
     }
     ,hp_vertica
     ,hsql
     ,hw_dws
     ,hw_elk
     ,hw_fusioninsight_hd
     ,hw_libr_a
     ,ibm_db2
     ,informix
     ,kingbase
     ,mysql
     ,oracle
     ,pivotal_greenplum_databasease
     ,postgresql
     ,presto
     ,sap_hana
     ,sap_sybase
     ,spark
     ,sql_server
     ,sqlite
     ,teradata
     ,transwarp_inceptor
     ,hw_hetu
     ,hadoop_krb_hive{
          @Override
          public boolean userAndPwdNotEmpty(String user, String pwd) {
               return true;
          }
     }
     ,max_compute
     ,ftp
     ,polardb_oracle
     ,dameng
     ,elasticsearch;

     public boolean userAndPwdNotEmpty(String user, String pwd){
          if (StringUtils.isEmpty(user) || StringUtils.isEmpty(pwd))
               return false;
          else
               return true;
     }


}
